// module/purchase/index.js

Component({
     /**
      * 组件的属性列表
      */
     properties: {

     },

     /**
      * 组件的初始数据
      */
     data: {
          inpont: '1123456',
          showView: true,
          list: [  ],
          list2: [ ],
          value: '',
          value2: '',
          indexTo: 0
     },
  
  onReady: function () {
    let that = this
    this.setData({
      goodsAll: wx.getStorageSync('savesTides')
    })
    console.log(wx.getStorageSync('savesTides'))
    let goods = wx.getStorageSync('savesTides')
    let goodsId = this.data.goodsId
    for (let i = 0; i < goods.length; i++) {
      goodsId.push({ images: goods[i].goodsImgs })
      console.log(goods[i])
    }
    this.setData({
      goodsId
    })
    //
  },
     /**
      * 组件的方法列表
      */
     methods: {
          change: function () {
               let that = this;
               that.setData({
                    showView: (!that.data.showView),
                    indexTo: 0,
               })
          },
          select: function (e) {
               let value = e.currentTarget.dataset.value
               let that = this
               this.setData({
                    value,
                    showView: (!that.data.showView),
               })
               console.log(value)
          },
          select2: function (e) {
               let value2 = e.currentTarget.dataset.value2
               let that = this
               this.setData({
                    value2,
                    showView: (!that.data.showView),
               })
               console.log(value2)
          },
          cangku: function (e) {
               let that = this;
               that.setData({
                    showView: (!that.data.showView),
                    indexTo: 1,
               })
          },
          add: function (e) {
               wx.navigateTo({
                    url: '/pages/management/administration/index',
               })
          },
       // 获取供应商
      
     
     },
  /*监听页面加载 */




})
